﻿@model IEnumerable<WebUI.Areas.Bots.Models.General>
@section PageName{@WebUI.Resources.Bots}
@section Title{@WebUI.Resources.Bots}
<table class="main_table" cellpadding="0" cellspacing="0">
    <tbody>
        <tr class="columns_head">
            <td colspan="2">
                <h2>
                    @Html.ActionLink(WebUI.Resources.CreateNewBot, @MVC.Bots.Index.Create())</h2>
            </td>
        </tr>
        <tr class="table_head">
            <td>
                Name
            </td>
            <td>
            </td>
        </tr>
        @foreach (var item in Model)
        {
            <tr>
                <td>
                    <span>@item.Name</span>
                </td>
                <td>
                    @Html.ActionLink(@WebUI.Resources.Details, MVC.Bots.Index.Details(item.Id))
                    |
                    @Html.ActionLink(@WebUI.Resources.Edit, MVC.Bots.Index.Edit(item.Id))
                    |
                    @using (Html.BeginForm(MVC.Bots.Index.Delete(item.Id), FormMethod.Post, new { onsubmit = "return confirm('Are you sure you want to delete " + item.Name + "?');" }))
                    {
                        <input class="link-button" type="submit" value='@WebUI.Resources.Delete'  />
                    }
                </td>
            </tr>
        }
    </tbody>
</table>